<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Fre · Fast 1kB React like library with the same hooks API</title>
</head>

<body>
  <style>
    .container{
      width: 800px;
      margin: 50px auto;
      text-align: center;
    }
    a{
      text-decoration: none;
      margin-left:50px;
      padding: 5px 15px;
      border-radius: 10px;
      color: #fff;
      background: rgb(238, 42, 140);
      font-size: 14px;
    }

  </style>
  <div id="root"></div>
  <script type="module">
    import { h, useState, render } from 'https://unpkg.com/fre?module'
    import htm from 'https://unpkg.com/htm?module'
    const html = htm.bind(h)

    function App() {
      return (
        html`
          <div class="container">
            <img src="http://wx2.sinaimg.cn/mw690/0060lm7Tly1ftpm5b3ihfj3096097aaj.jpg"/>
            <h1>Fre <a href="https://github.com/132yse/fre"> github </a></h1>
            <p>Tiny React16 like library with Async rendering.</p>
          </div>
        `
      )
    }

    render(html`<${App}/>`,document.getElementById('root'))

  </script>
</body>

</html>